import request from "@/request/";

// 物料检验标准列表
export const getList = (data) => {
  return request({
    url: "/api/mes-quality-service/standard/page",
    method: "POST",
    data,
  });
};

// 物料检验标准 - 新增
export const materialSave = (data) => {
  return request({
    url: "/api/mes-quality-service/standard/save",
    method: "POST",
    data,
  });
};

// 物料检验标准-更新状态
export const materialUpdateStatus = (data) => {
  return request({
    url: "/api/mes-quality-service/standard/updateStatus",
    method: "POST",
    data,
  });
};
// 物料检验标准 - 删除
export const materialDelete = (data) => {
  return request({
    url: "/api/mes-quality-service/standard/del",
    method: "POST",
    data,
  });
};

// 检验标准与物料列表
export const getStandardList = (data) => {
  return request({
    url: "/api/mes-quality-service/standard-in-material/page",
    method: "POST",
    data,
  });
};

// 检验标准与物料 - 新增
export const standardMaterialSave = (data) => {
  return request({
    url: "/api/mes-quality-service/standard-in-material/save",
    method: "POST",
    data,
  });
};
// 检验标准与物料 - 删除
export const standardMaterialDelete = (data) => {
  return request({
    url: "/api/mes-quality-service/standard-in-material/delete",
    method: "POST",
    data,
  });
};

export const standardUpdateStatus = (data) => {
  return request({
    url: "/api/mes-quality-service/standard-in-material/updateStatus",
    method: "POST",
    data,
  });
};

// 新增弹框-弹框 - 编辑 || 赋值 保存
export const getDialogPage = (data) => {
  return request({
    url: "/api/mes-quality-service/standard/detail",
    method: "POST",
    data,
  });
};

// 新增弹框-弹框 - 编辑 || 赋值 保存
export const dialogSave = (data) => {
  return request({
    url: "/api/mes-quality-service/test-project/save",
    method: "POST",
    data,
  });
};

// 新增弹框-弹框 - 编辑 || 赋值 编辑-保存
export const dialogUpdate = (data) => {
  return request({
    url: "/api/mes-quality-service/test-project/update",
    method: "POST",
    data,
  });
};

// 新增弹框-弹框 - 编辑 || 赋值 删除
export const dialogDelete = (data) => {
  return request({
    url: "/api/mes-quality-service/test-project/delete",
    method: "POST",
    data,
  });
};

// 物料检验标准 编辑 || 复制 暂存，保存
export const dialogAddUpdate = (data) => {
  return request({
    url: "/api/mes-quality-service/standard/update",
    method: "POST",
    data,
  });
};
export const getDialogCopy = (data) => {
  return request({
    url: "/api/mes-quality-service/standard/copy",
    method: "POST",
    data,
  });
};
